using System.Collections;
using System.Collections.Generic;
using FrameWork;
using FrameWork.Inventory;
using FrameWork.TileMapManager;
using UnityEngine;

public class LoadData : MonoBehaviour
{
    [SerializeField] private PlayerDataSO playerDataSO;
    [SerializeField] private MapModel mapModel;
    [SerializeField] private InventorySO inventorySO;
    [SerializeField] private TimeDataSO timeDataSO;


    public void SetData(SaveDataInfo saveDataInfo)
    {
        playerDataSO.Init(saveDataInfo.PlayerLv, saveDataInfo.PlayerCoins, saveDataInfo.PlayerCurrentExp);
        print(saveDataInfo.PlayerLv + " " + saveDataInfo.PlayerCoins + " " + saveDataInfo.PlayerCurrentExp);
        // mapModel.Init(saveDataInfo.CultivatedTiles, saveDataInfo.CropDatasDic);
        // print(saveDataInfo.CultivatedTiles + " " + saveDataInfo.CropDatasDic);
        // inventorySO.Init(saveDataInfo.MyInventorys, saveDataInfo.ItemDic);
        // print(saveDataInfo.MyInventorys + " " + saveDataInfo.ItemDic);
        timeDataSO.Init(saveDataInfo.CurrentDay, saveDataInfo.CurrentYear, saveDataInfo.CurrentSeason, saveDataInfo.CurrentHour, saveDataInfo.CurrentDayOfWeek);
        print(saveDataInfo.CurrentDay + " " + saveDataInfo.CurrentYear + " " + saveDataInfo.CurrentSeason + " " + saveDataInfo.CurrentHour + " " + saveDataInfo.CurrentDayOfWeek);
    }
}
